package test.demo;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description:
 * @author: JC
 * @date: 2023/4/5 13:50
 */
public class PropertyValues {
    List<PropertyValue> propertyValues = new ArrayList<PropertyValue>();

    public  PropertyValue[] getPropertyValues(){
        return propertyValues.toArray(new PropertyValue[0]);
    }
    public void addPropertyValue(PropertyValue pv){
        this.propertyValues.add(pv);
    }
    public PropertyValue getPropertyValue(final String name){
        for (PropertyValue propertyValue : propertyValues) {
            if(propertyValue.getName().equals(name)){
                return propertyValue;
            }
        }
        return null;
    }
}
